import request from '@/utils/request'

/**
 *  获取员工的简单列表
 * **/
export function menuList(params) {
    return request({
        url: '/menus',
        method: 'get',
        params

    })
}
/**
 * 菜单添加
 *
 * ***/
export function menuAdd(data) {
    return request({
        url: '/menus',
        method: 'POST',
        data
    })
}
/**
 * 菜单详情
 *
 * ***/
export function menuDetails(id) {
    return request({
        url: `/menus/${id}`,
        method: 'get'
    })
}

/**
 * 菜单修改
 *
 * ***/
export function menuModification(data) {
    return request({
        url: `/menus/${data.id}`,
        method: 'PUT',
        data
    })
}

/**
 * 菜单删除
 * ****/

export function menuDeletion(id) {
    return request({
        url: `/menus/${id}`,
        method: 'DELETE'
    })
}